<template>
  <div class="success-box">
    <TitleBar :title="title" :backFunction="goBack"></TitleBar>
    <section class="success">
      <div class="success-icon">
        <img src="../../assets/img/add-success.png" alt="">
      </div>
      <h6>品牌提交成功！</h6>
      <p>发送您的手机号至<span @click="goWx">品牌中网</span>公众号，审核<br>流程早知道！</p>
    </section>
    <section class="code-box">
      <div class="pic">
        <img src="../../assets/img/wx-url.jpg" alt="识别二维码">
      </div>
      <p>长按识别二维码<br>随时随地了解审核进度</p>
    </section>
    <SuccessFooter></SuccessFooter>
  </div>
</template>
<script>
import TitleBar from '../../components/TitleBar'
import SuccessFooter from '../../components/SuccessFooter'
export default {
  components: {
    TitleBar,
    SuccessFooter
  },
  data() {
    return {
      title: '提交成功'
    }
  },
  methods: {
    goWx() {
      if (this.$getDeviceInfo().isWeiXin && this.$getDeviceInfo().isPhone) {
        window.location.href = "https://mp.weixin.qq.com/mp/profile_ext?action=home&__biz=MzU5MTgwNDI2NA==&scene=126&bizpsid=0#wechat_redirect"
      }
    },
    goBack() {
      if (this.$route.query.formPath) {
        let formPath = decodeURIComponent(this.$route.query.formPath)
        this.$router.replace(formPath + '?catid=' + this.$route.params.catid)
      } else {
        this.$router.replace('/?catid=' + this.$route.params.catid)
      }
    }
  }
}
</script>
<style lang='scss' scoped>
.success-box {
  min-height: 100vh;
  background: #fff;
  position: relative;
  .success {
    .success-icon {
      margin: 0.6rem auto 0.4rem;
      text-align: center;
      img {
        width: 2.3rem;
        height: auto;
      }
    }
    h6 {
      font-size: 0.3rem;
      line-height: 0.5rem;
      text-align: center;
      font-weight: 500;
      color: rgba(51, 51, 51, 1);
    }
    p {
      font-size: 0.24rem;
      line-height: 0.34rem;
      text-align: center;
      font-weight: 500;
      color: rgba(102, 102, 102, 1);
      span {
        color: #739efbff;
      }
    }
  }
  .code-box {
    .pic {
      width: 1.9rem;
      height: 1.9rem;
      margin: 0.6rem auto 0;
      img {
        width: 100%;
        height: 100%;
      }
    }
    p {
      font-size: 0.28rem;
      line-height: 0.42rem;
      text-align: center;
      font-weight: 500;
      color: rgba(153, 153, 153, 1);
    }
  }
}
</style>
